package com.itheima.controller.v1.api;


import com.itheima.common.R;
import com.itheima.dto.ClueQueryDto;
import com.itheima.pojo.TbAssignRecord;
import com.itheima.pojo.TbClue;
import com.itheima.pojo.TbClueTrackRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

@Api(description = "线索相关接口文档")
public interface CluesControllerApi {


    //根据来源查询对应活动信息
    @ApiOperation(("根据来源查询对应活动信息"))
    public R listselect(@PathVariable String channel);

    @ApiOperation("线索添加接口")
    public R add(TbClue tbClue);

    @ApiOperation("线索分页展示接口")
    public R cluePage(ClueQueryDto clueQueryDto);

    @ApiOperation("分配线索--部门列表(对象集合)")//优化成String集合
    public R deptList();

    @ApiOperation("分配线索--员工列表(对象集合)")//优化成String集合
    public R deptUserList(Long deptId);

    @ApiOperation("批量分配线索")//添加线索分配记录表tb_assign_record
    public R addAssignRecordList(Long userId,List<Long> clueIds);

    @ApiOperation("单个线索分配")//tb_assign_record
    public R addAssignRecord(Long clueOrBusyId,TbAssignRecord tbAssignRecord);

    @ApiOperation("下载批量添加线索模板Excle")
    public /*R*/void downloadExcel() throws IOException;

    @ApiOperation("上传批量添加线索Excle")
    public R uploadExcel(MultipartFile file);

    @ApiOperation("线索查看/跟进--线索id对象")
    public R clueSimple(Long id);

    @ApiOperation("线索查看/跟进--活动id对象")
    public R activityById(Long activityId);

    @ApiOperation("修改线索状态--通用接口:待跟进1  跟进中2  回收3  伪线索4")
    //status:状态(待跟进中1  跟进中2  回收3  伪线索4)
    //false_count 伪线索失败次数(最大数3次)
    // 大于三次删除
    public R clueStatus(Long id, String status);

    @ApiOperation("线索跟进提交1--记录信息")
    //tb_clue_track_record
    public R addClueTrackRecord(TbClueTrackRecord tbClueTrackRecord);

    @ApiOperation("线索跟进提交2--更新线索")
    public R updateClue(TbClue tbClue);

    @ApiOperation("线索--转商机")
    //添加进入商机表
    public R addTbBusinessClue(TbClue tbClue);

    @ApiOperation("线索跟进记录回显")
    public R getClueTrackRecordByClueId(String clueId);





}
